laravel order by

39

laravel update from query -

$affected = DB::table('users')
              ->where('id', 1)
              ->update(['votes' => 1]);

laravel 6 orderby -

// Make sure column names are correct
$inquiries = Inquiry::orderBy('status', 'ASC')
    ->orderBy('created_at', 'DESC')
    ->get();

Comments

Submit
0 Comments